package com.hubu.chat.client;
import com.hubu.chat.message.LoginRequestMessage;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandler;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.concurrent.EventExecutorGroup;
public class LoginRequestMessageHandler extends ChannelInboundHandlerAdapter {
    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        new Thread(()->{
            String userName="lugang";
            String password="123456";
            LoginRequestMessage loginRequestMessage=new LoginRequestMessage(userName,password);
            ctx.writeAndFlush(loginRequestMessage);
        }).start();
        super.channelActive(ctx);
    }
}
